import logging,yagmail

def Log():
    logging.basicConfig(level=logging.INFO,
                            format='%(filename)s-%(message)s-%(levelname)s-%(asctime)s',
                            filename='WMS.log',
                            filemode='a+'
                        )



def send_email(filepath):

    email=yagmail.SMTP(user='3177622011@qq.com',password='xjwzrxaryqjydece',host='smtp.qq.com')
    email.send(to='3177622011@qq.com',subject='WMS的UI自动化测试',contents='这是一份WMS测试报告',attachments=filepath)